From 50a0d3b8eb9f7a4810606d365a9d8e010dcb17b4 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Mon, 16 Jul 2007 16:39:53 +0000 Subject: [PATCH] check if the pointer is really over the returned widget, since the 2007-07-16 Kristian Rietveld * gtk/gtktooltip.c (find_topmost_widget_coords_from_event): check if the pointer is really over the returned widget, since the coordinate check may not always be hit in find_widget_under_pointer(). svn path=/trunk/; revision=18478 --- ChangeLog | 6 ++++++ gtk/gtktooltip.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2001ec6f9e..7a2e12b058 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-16 Kristian Rietveld + + * gtk/gtktooltip.c (find_topmost_widget_coords_from_event): check + if the pointer is really over the returned widget, since the + coordinate check may not always be hit in find_widget_under_pointer(). + 2007-07-16 Matthias Clasen * gtk/gtkfilechooserbutton.c (model_add_special_get_info_cb): diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index f7fe733bf3..68ad4ceee8 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -593,6 +593,11 @@ find_topmost_widget_coords_from_event (GdkEvent *event, tmp = find_widget_under_pointer (event->any.window, &tx, &ty); + /* Make sure the pointer can actually be on the widget returned */ + if (tx < 0 || tx >= tmp->allocation.width || + ty < 0 || ty >= tmp->allocation.height) + return NULL; + if (x) *x = tx; if (y) -- 2.30.2